@extends('admin.master')

@section('title','会员列表')
@section('css')
    <!--dynamic table-->
    <link href="{{asset('admin/assets/js/advanced-datatable/css/demo_page.css')}}" rel="stylesheet" />
    <link href="{{asset('admin/assets/js/advanced-datatable/css/demo_table.css" rel="stylesheet')}}" />
    <link rel="stylesheet" href="{{asset('admin/assets/js/data-tables/DT_bootstrap.css')}}" />
@endsection

@section('content')
    <!-- page heading start-->
    <div class="page-heading">
        <h3>回收站</h3>
        <ul class="breadcrumb">
            <li class="active">
                <a href="{{ url('admin/index') }}">后台首页</a>
            </li>
            <li class="active">
                用户
            </li>
        </ul>
    </div>
    <!-- page heading end-->

    <!--body wrapper start-->
    <div class="wrapper">
        @if( session()->get('msg'))
            <div class="alert alert-success alert-dismissable">
                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                <strong>恭喜你</strong>{{  session()->get('msg') }}
            </div>
        @endif
        @if(count($errors)>0 || session()->get('error'))
            <div class="alert alert-danger alert-dismissable">
                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                <strong>错误</strong>
                @if(session()->get('error'))
                    {{ session()->get('error') }}
                @endif
                @if(count($errors)>0)
                    @foreach ($errors->all() as $error)
                        {{ $error }}
                    @endforeach
                @endif
            </div>
        @endif
        <div class="row">
            <div class="col-sm-12">
                <section class="panel">
                    <header class="panel-heading">
                        管理员表
                        <span class="tools pull-right">
                           <a href="javascript:;" class="fa fa-chevron-down"></a>
                           <a href="javascript:;" class="fa fa-times"></a>
                       </span>
                    </header>
                    <div class="panel-body">
                        <div class="adv-table">
                            <table  class="table table-bordered table-striped">
                                <thead>
                                <th class="text-center">用户编号</th>
                                <th class="text-center">手机</th>
                                <th class="text-center">邮箱</th>
                                <th class="text-center">上次登录时间</th>
                                <th class="text-center">注册时间</th>
                                <th class="text-center">操作</th>

                                </thead>
                                <tbody>
                                @foreach($data as $key1 => $value1)
                                    <tr>
                                        <td class="text-center">{{$value1['attributes']['id']}}</td>
                                        <td class="text-center">{{$value1['attributes']['phone']}}</td>
                                        <td class="text-center">{{$value1['attributes']['email']}}</td>
                                        <td class="text-center">{{$value1['attributes']['updated_at']}}</td>
                                        <td class="text-center">{{$value1['attributes']['created_at']}}</td>
                                        <td class="text-center">
                                            <a href="user_update?id={{ $value1['attributes']['id'] }}"><i class="fa fa-pencil"></i>恢复</a>
                                            <a href="user_delete?id={{ $value1['attributes']['id'] }}"><i class="fa fa-times"></i>删除</a>
                                        </td>
                                    </tr>
                                @endforeach
                                </tbody>
                            </table>
                        </div>
                    </div>
                </section>
            </div>
        </div>
    </div>
    <!--footer section start-->
    <footer>
        2014 &copy; AdminEx by <a href="http://www.aspku.com/" target="_blank">源码之家</a>
    </footer>
    <!--footer section end-->
@endsection

@section('js')
    <!--dynamic table-->
    <script type="text/javascript" language="javascript" src="{{asset('admin/assets/js/advanced-datatable/js/jquery.dataTables.js')}}"></script>
    <script type="text/javascript" src="{{asset('admin/assets/js/data-tables/DT_bootstrap.js')}}"></script>
    <!--dynamic table initialization -->
    <script src="{{asset('admin/assets/js/dynamic_table_init.js')}}"></script>
@endsection


